package vip.liux.backend.application.service.pay.dto.order;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import vip.liux.contracts.shared.enums.pay.PayOrderStatus;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付订单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author aquan
 */
@Data
public class PayOrderBaseDto {

    @NotNull(message = "应用编号不能为空")
    private Long appId;

    private Long channelId;

    private String channelCode;

    @NotNull(message = "商户订单编号不能为空")
    private String merchantOrderId;

    @NotNull(message = "商品标题不能为空")
    private String subject;

    @NotNull(message = "商品描述不能为空")
    private String body;

    @NotNull(message = "异步通知地址不能为空")
    private String notifyUrl;

    @NotNull(message = "支付金额，单位：元不能为空")
    private BigDecimal price;

    private Double channelFeeRate;

    private BigDecimal channelFeePrice;

    @NotNull(message = "支付状态不能为空")
    private PayOrderStatus status;

    @NotNull(message = "用户 IP不能为空")
    private String userIp;

    @NotNull(message = "订单失效时间不能为空")
    private LocalDateTime expireTime;

    private LocalDateTime successTime;

    private String orderNo;

    @NotNull(message = "退款总金额，单位：元不能为空")
    private BigDecimal refundPrice;

    private String channelOrderNo;
}
